/**
 * Created by Francis.LW on 2017/10/20.
 *
 * 表单项服务接口
 */
import {postRequest, getRequest} from '@/common/request'
import {urls} from './url'

const formGroupRItemApi = urls.formGroupRItem


function listformGroupRItem(param, page, pageSize, success, complete) {
  postRequest(formGroupRItemApi.listformGroupRItem + '?currentpage=' + page + '&pagesize=' + pageSize, {}, param, success, complete)
}

function getformGroupRItem(id, success, complete) {
  getRequest(formGroupRItemApi.getformGroupRItem + id, {}, success, complete)
}

function removeformGroupRItem(ids, success, complete) {
  postRequest(formGroupRItemApi.removeformGroupRItem, {}, ids, success, complete)
}

function deleteSingleformGroupRItem(id, success, complete) {
  let ids = []
  ids.push(id)
  removeformGroupRItem(ids, success, complete)
}

export default {
  listformGroupRItem,
  getformGroupRItem,
  removeformGroupRItem,
  deleteSingleformGroupRItem
}
